<?php
namespace api\controllers;

use Yii;
use yii\rest\Controller;
use yii\rest\ActiveController;

class TestController extends ActiveController
{
    public $modelClass = 'api\models\Articles';
    
    public function actions()
    {
        $actions = parent::actions();
        unset($actions['index'],$actions['view']);
        return $actions;
    }
        
    public function actionIndex()
    {
        return ['code'=>200];
        
//         return Yii::$app->db;
    }
    
    public function actionView()
    {
        return ['action'=>'show'];
    }
    
    public function actionHello()
    {
        return ['code'=>300];
    }
    
    public function actionTotal()
    {
        
        
    }

}